package com.service.impl;

import com.bean.Favorite;
import com.bean.FavoriteList;
import com.dao.FavoriteDao;
import com.dao.impl.FavoriteDaoImpl;
import com.service.FavoriteService;

import java.util.List;

public class FavoriteServiceImpl implements FavoriteService {
    FavoriteDao favoriteDao=new FavoriteDaoImpl();
//添加收藏
    @Override
    public int addFav(Favorite favorite) {
        return favoriteDao.addFav(favorite);
    }
//删除收藏
    @Override
    public int seleteFav(Integer id) {
        return favoriteDao.deleFav(id);
    }
//查询收藏
    @Override
    public List<FavoriteList> queryFav(Integer id) {
        return favoriteDao.queryForFavType(id);
    }
}
